<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>修改商户号</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link href="/lobsteruiframe/layuiadmin/layui/css/layui.css" rel="stylesheet" />
    <link href="/lobsteruiframe/layuiadmin/style/admin.css" rel="stylesheet" />
    <script src="/lobsteruiframe/layuiadmin/layui/layui.js"></script>

    <script src="/jslib/jquery-3.4.1.min.js"></script>
    <script src="/jslib/lobster.js"></script>
</head>


<body>
    <div class="layui-fluid box">
        <div class="layui-form" lay-filter="mchinfo" style="padding: 0px 0px 0 0;">
            <div class="layui-card">
                <div class="layui-card-body box">
                    <input type="hidden" name="ID" value="0" />
                    <input type="hidden" name="SubMchId" value="" />
                    <div class="layui-form-item active">
                        <label class="layui-form-label"><i style="color:red;">*&ensp; </i>商户名称</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" name="SubMchName" />
                        </div>
                    </div>
                    <div class="layui-form-item active">
                        <label class="layui-form-label">用途</label>
                        <div class="layui-input-block">
                            <textarea name="Purpose" style="width:100%;height:100px;"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item active">
                        <label class="layui-form-label"><i style="color:red;">*&ensp; </i>验证key</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" name="Keys" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script>
lobsterlayui.main(['index', 'layer', 'form', 'element'], {
    data: {
        model: {},
        sellistinfo: {},
    },
    pageload: function (right) {
        console.log(right);
        console.log(parent);
        console.log(parent.sellistinfo);
        var self=this;
        self.data.sellistinfo = parent.sellistinfo;
        if (self.data.sellistinfo) {
            layui.form.val("mchinfo", self.data.sellistinfo)
        }
        self.initevent();
    },
    initevent() {
        var self=this;
        window.parent.getResult = function () {

            self.data.model = layui.form.val("mchinfo");
            if (!self.data.model.SubMchName) {
                layer.msg("名称不能为空");
                return;
            }
            if (!self.data.model.Keys) {
                layer.msg("验证key不能为空");
                return;
            }
            return self.data.model;
        }
    },
})
</script>

</html>